/*
import java.util.Stack;
import java.util.Scanner;

public class Main {

    public static int precedence(char op) {
        if (op == '+' || op == '-') return 1;
        if (op == '*' || op == '/') return 2;
        return 0;
    }

    // 求后缀表达式的值
    public static int evaluatePostfix(String postfix) {
        Stack<Integer> valStack = new Stack<>();

        for (char c : postfix.toCharArray()) {
            if (Character.isDigit(c)) {
                valStack.push(c - '0'); // 将字符转化为整数
            } else if (c == '+' || c == '-' || c == '*' || c == '/') {
                int val2 = valStack.pop();
                int val1 = valStack.pop();
                int result = 0;

                switch (c) {
                    case '+': result = val1 + val2; break;
                    case '-': result = val1 - val2; break;
                    case '*': result = val1 * val2; break;
                    case '/': result = val1 / val2; break;
                }
                valStack.push(result);
            }
        }
        return valStack.pop();
    }

    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        String a = sc.nextLine();
        StringBuilder ans = new StringBuilder();
        Stack<Character> st = new Stack<>();

        for (char c : a.toCharArray()) {
            if (Character.isDigit(c)) {
                ans.append(c);
            } else if (c == '(') {
                st.push(c);
            } else if (c == ')') {
                while (!st.isEmpty() && st.peek() != '(') {
                    ans.append(st.pop());
                }
                st.pop(); // 弹出左括号
            } else if (c == '=') {
                while (!st.isEmpty()) {
                    ans.append(st.pop());
                }
            } else {
                while (!st.isEmpty() && precedence(st.peek()) >= precedence(c)) {
                    ans.append(st.pop());
                }
                st.push(c);
            }
        }

        System.out.println(ans.toString());

        int result = evaluatePostfix(ans.toString());
        System.out.println(result);
    }
}*/
